package com.example.demo.htmlemail;

/**
 * Created by Hy on 2018/8/6.
 */
public class MailSendTest {
    public static void main(String[] args) {
        Mail mail = new Mail();
        mail.setHost("smtp.139.com");
        mail.setSender("15012553061@139.com");
        mail.setReceiver("1070061895@qq.com");//接收人
        mail.setUsername("15012553061@139.com");//登录账号，一般都是和邮箱名一样
        mail.setPassword("hy19880801");//发件人的登录密码
        mail.setSubject("邮箱发送测试");
        mail.setMessage("welcome to china");
        new MailUtil().send(mail);
    }
}
